﻿ <!-- main部分 -->
<div class="main-newsdate"></div>
<div class="layui-container">

    <form class="layui-form">
        
                <div class="layui-row layui-col-space15 layui-form-item">

                <div class="layui-col-md6"><label class="layui-form-label">姓名</label><div class="layui-input-block"><input lay-filter="column" class="layui-input" id="XM" name="XM" type="text" placeholder="请输入姓名"></div></div><div class="layui-col-md6"><label class="layui-form-label">许别</label><div class="layui-input-block"><input lay-filter="column" class="layui-input" id="XB" name="XB" type="text" placeholder="请输入许别"></div></div><div class="layui-col-md6"><label class="layui-form-label">主键</label><div class="layui-input-block"><input lay-filter="column" class="layui-input" id="ID" name="ID" type="text" placeholder="请输入主键"></div></div><div class="layui-col-md6"><label class="layui-form-label">表</label><div class="layui-input-block"><input lay-filter="column" class="layui-input" id="table" name="table" type="text" placeholder="请输入表"></div></div></div>
            
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="_submit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script>

    layui.use(['form', 'laydate', 'table', 'laytpl', 'layedit', 'layer'], function () {
        var table = layui.table, form = layui.form
            , layer = layui.layer
            , laydate = layui.laydate; laytpl = layui.laytpl; layedit = layui.layedit;
        form.on('submit(_submit)', function (data) {
            $.post("/api/Form/FormSave", {table: $("#table").val(),data: JSON.stringify(data.field) }, function (resp) {
              //  resp = JSON.parse(resp);
                //if (resp.Success) {
                //    window.location.href = "#article";
                //}
            })

            return false;
        });



    });
</script>
